class TeamEntity{
  String? index;
  String? teamName;
  String? teamLogo;
  int? qxbTeamId;
  int? home;
  List<String>? values;

  TeamEntity(
      {this.index,
        this.teamName,
        this.teamLogo,
        this.home,
        this.values,
        this.qxbTeamId});

  TeamEntity.fromJson(Map<String, dynamic> json) {
    index = json['index'];
    teamName = json['teamName'];
    teamLogo = json['teamLogo'];
    home = json['home'];
    qxbTeamId = json['qxbTeamId'];
    values = json['values']?.cast<String>();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['index'] = this.index;
    data['teamName'] = this.teamName;
    data['teamLogo'] = this.teamLogo;
    data['home'] = this.home;
    data['values'] = this.values;
    data['qxbTeamId'] = this.qxbTeamId;
    return data;
  }
}

class AllTeamEntity {
  List<String>? header;
  TeamByType? data;

  AllTeamEntity({this.header, this.data});

  AllTeamEntity.fromJson(Map<String, dynamic> json) {
    header = json['header']?.cast<String>();
    data = json['data'] != null ? new TeamByType.fromJson(json['data']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['header'] = this.header;
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    return data;
  }
}

class TeamByType {
  List<TeamEntity>? all;
  List<TeamEntity>? home;
  List<TeamEntity>? guest;

  TeamByType({this.all, this.home, this.guest});

  TeamByType.fromJson(Map<String, dynamic> json) {
    if (json['all'] != null) {
      all = <TeamEntity>[];
      json['all'].forEach((v) {
        all!.add(new TeamEntity.fromJson(v));
      });
    }
    if (json['home'] != null) {
      home = <TeamEntity>[];
      json['home'].forEach((v) {
        home!.add(new TeamEntity.fromJson(v));
      });
    }
    if (json['guest'] != null) {
      guest = <TeamEntity>[];
      json['guest'].forEach((v) {
        guest!.add(new TeamEntity.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.all != null) {
      data['all'] = this.all!.map((v) => v.toJson()).toList();
    }
    if (this.home != null) {
      data['home'] = this.home!.map((v) => v.toJson()).toList();
    }
    if (this.guest != null) {
      data['guest'] = this.guest!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}